package com.totem.customer.api;

import com.totem.base.model.PageVO;
import com.totem.base.model.Result;
import com.totem.customer.vo.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@Tag(name="ITCustomerServiceApi", description="客户信息服务")
public interface ITCustomerServiceApi {
    @Operation(summary="创建客户信息")
    @PostMapping("/customer/create")
    @ResponseBody
    Result<Boolean> create(@RequestBody CustomerCreateVO vo);
    @Operation(summary="查询当前客户信息")
    @PostMapping("/customer/profile")
    @ResponseBody
    Result<CustomerProfileVO> profile();
    @Operation(summary="根据主键查询客户信息")
    @GetMapping("/customer/getVoById")
    @ResponseBody
    Result<CustomerVO> getVoById(@RequestParam(value="id") Long id);
    @Operation(summary="客户登陆", description="该接口不需要认证,返回token用于调用其他接口的认证")
    @PostMapping("/customer/login")
    @ResponseBody
    Result<CustomerLoginVO> login(@RequestBody @Valid CustomerLoginVO vo);
    @Operation(summary="客户退出")
    @PostMapping("/customer/logout")
    @ResponseBody
    Result<Boolean> logout(@RequestBody CustomerLogoutVO vo);
    @Operation(summary="重置密码")
    @PostMapping("/customer/password/reset")
    @ResponseBody
    Result<Boolean> resetPassword(@RequestBody ResetPasswordVO vo);
    @Operation(summary="修改交易密码")
    @PostMapping("/customer/txpassword/update")
    @ResponseBody
    Result<Boolean> updateTxPassword(@RequestBody UpdateTxPasswordVO vo);
    @Operation(summary="根据邮箱或手机号查询用户")
    @PostMapping("/customer/search/emailOrMobile")
    @ResponseBody
    Result<InviteVO> searchByEmailOrMobile(@RequestBody SearchByEmailOrMobileVO vo);
    @Operation(summary="检查用户是否可以注册")
    @PostMapping("/customer/register/check")
    @ResponseBody
    Result<Boolean> registerCheck(@RequestBody RegisterCheckVO vo);
    @Operation(summary="团队信息")
    @PostMapping("/customer/team/info")
    @ResponseBody
    Result<TeamInfoVO> teamInfo(@RequestBody TeamInfoVO vo);
}
